local gongsi = fk.CreateSkill {
  name = "lingling__gongsi",
  tags = { Skill.Compulsory },
}

gongsi:addEffect(fk.TargetConfirmed, {
  anim_type = "defensive",
  can_refresh = function(self, event, target, player, data)
    if target == player and player:hasSkill(gongsi.name, true) then
      return player.room.current ~= player
    end
  end,
  on_refresh = function(self, event, target, player, data)
    player.room:addPlayerMark(player, "lingling__gongsi-turn", 1)
  end,
})

gongsi:addEffect("prohibit", {
  is_prohibited = function(self, from, to, card)
    if from and card and to:hasSkill(gongsi.name) then
      return to:getMark("lingling__gongsi-turn") > 1
    end
  end
})

Fk:loadTranslationTable{
  ["lingling__gongsi"] = "公私",
  [":lingling__gongsi"] = "锁定技，你的回合外，你每回合至多被使用两张牌。",
}

return gongsi